package edu.zut.operator;

import java.util.Scanner;

public class OperatorDemo4 {

    public static void main(String[] args) {
        //比较运算符   比较结果是true(成立)或false（不成立）    流程控制语句中
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入两个整数");
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        boolean r = a > b;
        System.out.println("a > b =" + r);
        r = a < b;
        System.out.println("r = " + r);
        r = a == b;
        System.out.println("r = " + r);
        r = a != b;
        System.out.println("r = " + r);

        // &&  || 连接多个条件的
        System.out.println("请用户输入账号以及密码");
        String username = scanner.next();
        String password = scanner.next();
        //假设账号是jack密码是123456   字符串的比较使用equals
        boolean flag1 = username.equals("jack");
        boolean flag2 = password.equals("123456");
        boolean result = flag1 && flag2;
        System.out.println("result = " + result);

//        flag1 = 9 < 19 || 6 > 3;
//        System.out.println(flag1);



    }

}
